﻿#ifndef _DATASOCKET_H
#define _DATASOCKET_H

#include "basetype.h"
#include "socketfd.h"

using namespace TypesLib;

namespace SocketLib
{
const int SessionBufferSize = 4096;

class DataSocket : public SocketFD
{
public:
    DataSocket();
    void                writeBuffer(char*, int);
protected:
    bool                onRead();
    bool                onSend();
    void                init();
private:
    virtual void        onRecvComplete(char* aBuffer, int aBufferLen)    {}

private:
    SizeMagicType<SessionBufferSize>    m_sendBuffer;

protected:
    SizeMagicType<SessionBufferSize>    m_recvBuffer;
};
}

#endif
